#include "cObjectManager.h"

#include "cImageManager.h"
#include "cAirplaneManager.h"
#include "cAirplane.h"

#include "Command.h"

cObjectManager::cObjectManager( HDC& pOffDC ):
mOffDC(pOffDC)
{
	mAirplaneManager = new cAirplaneManager;
}

cObjectManager::~cObjectManager(void)
{
}

void cObjectManager::CreateObject( eObject pType, int pID, int pImageID, int pAni, int pEnergy, int pX, int pY )
{
	if (pType == eAirplan)
	{
		mAirplaneManager->CreateAirplane(pID, pImageID, pAni, pEnergy, pX, pY);
	}
}

void cObjectManager::Draw()
{
	mAirplaneManager->Draw(mOffDC);
}

void cObjectManager::Order( int pID, int pEnergy, int pX, int pY )
{
	mAirplaneManager->Order( pID, pEnergy, pX, pY);
}

void cObjectManager::Move()
{
	mAirplaneManager->Order();
}
